<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>浮动</title>
    <style>

        .container{
             width: 600px;
            border: 1px solid;
            float: left;
            padding: 10px;
        }

        .box{
            width: 100px;
            height: 100px;
            text-align: center;
            line-height: 100px;
            margin: 5px;
            background-color: greenyellow;

        }
        .left{
            float: left;
        }
        .right{
            float: right;
        }
    </style>
</head>
<body>

<div class="container">
<div class="right">
    <div class="box left">1</div>
    <div class="box left">2</div>
</div>
    <div class="box left">3</div>
</div>

</body>
</html>